import axios from 'axios';
import {  req } from './axiosfun';
// 获取树形菜单
export const getTreeList=()=>{
    return req("get",`/api/Menu/GetTreeList`)
}
//菜单详情
export const GetMenuId=(id)=>{
    return req("get",`/api/Menu/${id}`)
}
//新增菜单
export const Create=(params)=>{
    return req("post","/api/Menu/Create",params)
}
//修改菜单
export const Update=(id,params)=>{
    return req("put","/api/Menu?id="+id,params)
}
//删除菜单
export const Delete=(id)=>{
    return req("delete","/api/Menu?id="+id)
}
export function getMenuSelect() {
    return req("get", "/api/Menu/GetMenuSelectAsync")
};
export default {
    getTreeList,
    GetMenuId,
    Create,
    Update,
    Delete,
    getMenuSelect
};